public class BatchRatingGroupModel extends Object implements XMLMarshallable, Comparable<BatchRatingGroupModel>
Java class represents a batch rating group configured in the SAP CC.
The SAP CC system may handle offline and online charging services at the same time. Some subscriptions are charged in batch
using the SAP CC BART Server system whereas others may be charged using other mechanism (online mediation).
Batch rating group is used to represent a set of hybrid and/or
offline subscriptions that share common rating
(and implicitly billing) cycles.The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="batchRatingGroup">
<xs:complexType>
<xs:attribute name="id" type="xs:integer" />
<xs:attribute name="code" type="xs:string" />
<xs:attribute name="description" type="xs:string" />
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static short |
BATCH_RATING_GROUP_UNSET |
static short |
DEFAULT_BATCH_RATING_GROUP_ID |
static short |
MAX_BATCH_RATING_GROUP_ID |
static String |
OPERATION_NAME
The XML tag name: "batchRatingGroup"
|
| Constructor and Description |
|---|
BatchRatingGroupModel() |
BatchRatingGroupModel(short batchRatingGroupId,
String code,
String description)
Creates a batch rating group uniquely identified by its batch rating group identifier (shared with SAP CC BART Server,
if available) and its batch rating group code.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
int |
compareTo(BatchRatingGroupModel batchRatingGroup) |
String |
getBatchRatingGroupCode()
Returns the batch rating group code that must be not empty and must be unique.
|
String |
getBatchRatingGroupDescription()
Returns the batch rating group description that must be not empty.
|
short |
getBatchRatingGroupId()
Returns the batch rating group identifier that must be unique.
|
static String |
getName()
Gets the name of the related XML element.
|
void |
marshal(XMLOutputter output)
Gives an XML representation of this object, including its children.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setBatchRatingGroupCode(String code)
Sets the batch rating group code that must be not empty and must be unique.
|
void |
setBatchRatingGroupDescription(String description)
Sets the batch rating group description that must be not empty.
|
void |
setBatchRatingGroupId(short id)
Sets the batch rating group identifier that must be unique.
|
String |
toString() |
boolean |
validate()
Checks that identifier, name and description have been correctly filled in.
|
public static final String OPERATION_NAME
public static final short BATCH_RATING_GROUP_UNSET
public static final short DEFAULT_BATCH_RATING_GROUP_ID
public static final short MAX_BATCH_RATING_GROUP_ID
public BatchRatingGroupModel()
public BatchRatingGroupModel(short batchRatingGroupId,
String code,
String description)
batchRatingGroupId - The unique identifier of the batch rating group. This identifier must be greater
than DEFAULT_BATCH_RATING_GROUP_ID
and smaller than MAX_BATCH_RATING_GROUP_ID.code - The code of the batch rating group, must not be emptydescription - The description of the batch rating group, must not be emptypublic static String getName()
public final short getBatchRatingGroupId()
public void setBatchRatingGroupId(short id)
id - The batch rating group identifierpublic final String getBatchRatingGroupCode()
public void setBatchRatingGroupCode(String code)
code - The batch rating group codepublic final String getBatchRatingGroupDescription()
public void setBatchRatingGroupDescription(String description)
description - The batch rating group descriptionpublic boolean validate()
throws IllegalStateException
true if the batch rating group is valid, false otherwiseIllegalStateExceptionpublic int compareTo(BatchRatingGroupModel batchRatingGroup)
compareTo in interface Comparable<BatchRatingGroupModel>public void addCharacterData(String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object intopublic void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current element